#include<bits/stdc++.h>
#define ll long long
using namespace std;
mt19937 mt(chrono::system_clock::now().time_since_epoch().count());
int main(){
	ios::sync_with_stdio(0);
  	//freopen(".in","r",stdin);
  	freopen("fire.in","w",stdout);
	int n=4000,q=50000,w=1000000000;
	cout<<n<<' '<<q<<'\n';
	while(q--){
		if(/*mt()%5*/1){
			cout<<1<<' '<<mt()%2<<' '<<mt()%n+1<<' '<<mt()%4+1<<' '<<mt()%1000000000+1<<'\n';
		}else{
			cout<<2<<' '<<mt()%n+1<<' '<<mt()%n+1<<'\n';
		}
	}
}
